<template>
  <div>
   <router-link to="/one" tag="button">One</router-link>
   <router-link to="/two" tag="button">Two</router-link>
   <transition name="laol">
   <router-view></router-view>
   </transition>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
.box {
  width: 200px;
  height: 200px;
  background: yellowgreen;
}
.laol-enter,
.laol-leave-to{
  opacity: 0;
}
.laol-enter-active{
  transition: all 2s linear;
}
.laol-leave-active{
  transition: all 2s linear;
  position: absolute;
}
</style>
